To replicate the analysis:

1. Download the required BHPS datasets from the UK Data Service (https://ukdataservice.ac.uk):

University of Essex, Institute for Social and Economic Research. (2022). Understanding Society: Waves 1-12, 2009-2021 and Harmonised BHPS: Waves 1-18, 1991-2009. [data collection]. 17th Edition. UK Data Service. SN: 6614, DOI: 10.5255/UKDA-SN-6614-18

Mare, D. (2015). British Household Panel Survey: Programs for Generating Consistent Work-Life Histories: Waves 1-18, 1991-2009. [data collection]. University of Essex, Institute for Social and Economic Research, [original data producer(s)]. University of Essex, Institute for Social and Economic Research. SN: 7821, DOI: 10.5255/UKDA-SN-7821-1

2. Update the directory section of the 00_master_file.do 

3. Run the 00_master_file.do file in Stata. This runs all the other Stata scripts, reproducing the main analysis.

4. Update the working directory of code/30_main_figures.Rmd

5. Run file in R. This recreates all figures shown in the article and appendix.



